#ifndef MAINMUSIC_H
#define MAINMUSIC_H

#include <QMainWindow>
#include <QMediaPlayer>
#include <QMediaPlaylist>
#include <QListWidgetItem>

namespace Ui {
class mainMusic;
}

class mainMusic : public QMainWindow
{
    Q_OBJECT

public:
    explicit mainMusic(QWidget *parent = nullptr);
    ~mainMusic();

private slots:
    void on_btn_return_clicked();
    void on_btn_play_clicked();
    void on_btn_openfile_clicked();
    void on_listWidget_itemDoubleClicked(QListWidgetItem *item);
    void on_btn_prev_clicked();
    void on_btn_next_clicked();
    
    void onDurationChanged(qint64 duration);
    void onPositionChanged(qint64 position);
    void on_horizontalSlider_sliderMoved(int position);

    void on_pushButton_clicked();

    void on_verticalSlider_sliderReleased();

    void on_pushButton_3_clicked();

    void on_pushButton_2_clicked();

private:
    Ui::mainMusic *ui;
    QMediaPlayer* player;
    QMediaPlaylist* playlist;
    bool userIsSeeking;
};

#endif // MAINMUSIC_H
